package com.tca.spring.framework.learning.aop;

import com.tca.spring.framework.learning.aop.config.AopConfig;
import com.tca.spring.framework.learning.aop.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author zhoua
 * @Date 2021/5/3
 */
@Slf4j
public class AopStarter {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AopConfig.class);
        LogService logService = applicationContext.getBean(LogService.class);
        logService.log("Messi", "welcome");
    }
}
